package github.fafaovo.common.event;

import github.fafaovo.deepcapacity;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.Fluids;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.eventbus.api.Event;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;

//@Mod.EventBusSubscriber(modid = deepcapacity.MOD_ID)
public class CreateFluidEvent {
    //禁用无限水
    //@SubscribeEvent
    public static void onFluidPlaceBlockEvent(BlockEvent.CreateFluidSourceEvent event) {
        Fluid fluid = event.getState().getFluidState().getFluid();
        if(fluid.equals(Fluids.WATER))
            event.setResult(Event.Result.DENY);
    }
}
